using UnityEngine;

[System.Serializable]
public class Sound
{
    public AudioClip clip;
    [Range(0, 1)] public float volume = 1f;
    public float pitch = 1f;
    public bool randomPitch = false;
    public bool loop = false;
    public float minPitch = 0.995f;
    public float maxPitch = 1.05f;

    public float GetPitch()
    {
        return (randomPitch) ? Random.Range(minPitch, maxPitch) : pitch;
    }

    public bool IsValid
    {
        get { return clip != null; }
    }
}
